<?php 
class Gold_Productshipping_IndexController extends Mage_Core_Controller_Front_Action{

    public function indexAction(){
        $categoryId = (int) $this->getRequest()->getParam('category', false);
        $productId  = (int) $this->getRequest()->getParam('id');
        $params = new Varien_Object();
        $params->setCategoryId($categoryId);
        Mage::helper('catalog/product')->initProduct($productId, $this, $params);
        $this->loadLayout();
        $this->renderLayout();
    }
    public function estimateUpdatePostAction()
    {
        $code = (string) $this->getRequest()->getParam('estimate_method');
        if (!empty($code)) {
             Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->setShippingMethod($code)/*->collectTotals()*/->save();
        }
        $productId  = (int) $this->getRequest()->getParam('id');
        $this->_redirect('productshipping/index/index/id/'.$productId);
    } 
} 
?>
